﻿@model IEnumerable<ForumWrapper>
@{
    Layout = "~/Views/Shared/_Dashboard.cshtml";
}
@UIHelper.ImageTitle(Html.Global("forums", "MyModerateForums"))
@{
    Ajax.Dna().Grid(Model)
        .Columns(cols =>
        {
            cols.Bound(m => m.ID).Title("").Template(@<text>
    @Community.GetForumIconHtml(item)
    </text>);
            cols.Bound(m => m.Title).Title(Html.Global("forums", "Forum")).Template(@<text>
    <h2 class="d-forums-thread-title">
        <a href="javascript:void(0);" onclick="uiHelper.blockUI($('#forumModeratedThreads')); $('#forumModeratedThreads').load('@Url.Action("ModeratedThreads", "Thread", new { Area = "Community", id = item.ID })',function(){uiHelper.unblockUI($('#forumModeratedThreads'));});">@item.Title</a>
    </h2>
    <div style="font-weight: normal; padding-left: 2px;">
        @item.Description</div>
    </text>);
            cols.Bound(m => m.ID).Title(Html.Global("forums", "ModeratedThreads")).Template(@<text>
    @(item.UnapproveThreads <= 0 ? "-" : item.UnapproveThreads.ToString())
    </text>);
            cols.Bound(m => m.TotalThreads).Title(Html.Global("forums", "ModeratedPosts")).Template(@<text>
    @(item.UnapprovePosts <= 0 ? "-" : item.UnapprovePosts.ToString())
    </text>);
        })
        
        .Render();
}
<div id="forumModeratedThreads" style="margin-top: 10px;">
</div>
